<template>
  <div>
    <mt-swipe class="mtitem" :auto="2000">
      <mt-swipe-item v-for="item in imageList" :key="item._id">
        <a :href="item.name">
          <img :src="'http://api.cat-shop.penkuoer.com'+item.coverImg" alt="0">
        </a>
      </mt-swipe-item>
    </mt-swipe>
  </div>
</template>

<style  scoped>
/**
    1.0 轮播图的样式
    */
a {
  display: block;
  width: 100%;
  height: 300px;
}
.mtitem {
  height: 250px;
  width: 100%;
}
.mtitem img {
  height: 250px;
  /*height: auto;*/
  width: 100%;
}
</style>

<script>
export default {
  data() {
    return {};
  },
  mounted() {
    console.log("11111");
    console.log(this.imageList);
  },
  updated() {
    console.log("22222");
    console.log(this.imageList);
  },
  props: ["imageList"]
};
</script>